package com.cxc.kafka.demo.listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class CustomerListener {

//    @KafkaListener(groupId = "test-consumer-group", topics= "test")
    @KafkaListener(groupId = "test-consumer-group", topics= "TOPIC_TEST")
    public void onMessage(String message){
        log.info("接收到的消息：{}",message);
    }

}
